<ul class="clearfix" id="navList">

	<!-- 	<li><a href="?module=monitor&subModule=location">位置定位</a></li>
	<li><a href="?module=monitor&subModule=trackPlay">轨迹回放</a></li>
	<li><a href="#">实时视频</a></li>
	<li><a href="#">视频回放</a></li> -->

	<li><a href="./vehicle/adminIndex" target="_blank">后台管理</a></li>
</ul>
<script>
	var authority = JSON.parse('${authority}');
	var html = "";
	$.each(authority, function(i, item) {
		if (item.type == 1) {
			$.each(item.children, function(i, child) {
				html += '<li><a href="?module=' + item.module + '&subModule='
						+ child.subModule + '">' + child.name + '</a>';
			});
		}
	});
	$('#navList').prepend(html);
	$("#navList li a:last").click(
			function() {
				$(this).addClass("header-active").parent().siblings().find("a")
						.removeClass("header-active");
			})
	$("#navList li a:first").addClass("header-active");
	$.each($("#navList li a"), function(index, item) {
		if (location.href.indexOf($(item).attr("href")) !== -1) {
			$(item).addClass("header-active").parent().siblings().find("a")
					.removeClass("header-active");
		}
	})
	$(function() {
		$("#logOut").click(function() {
			swal({
				title : "确定要退出吗",
				showCancelButton : true,
				confirmButtonColor : "#DD6B55",
				confirmButtonText : "确定",
				cancelButtonColor : "#AEDEF4",
				cancelButtonText : "取消",
				closeOnConfirm : true
			}, function() {
				location.href = '${request.contextPath}/vehicle/logout';
			});
		})
	})
</script>
